import request from '@/utils/request'
import qs from 'qs'

export function add(data) {
  return request({
    url: 'api/tEvent',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/tEvent/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/tEvent',
    method: 'put',
    data
  })
}

export function importZip(data) {
  return request({
    url: 'api/tEvent/importZip',
    method: 'post',
    data
  })
}

export function tObjection(data) {
  return request({
    url: '/api/tObjection',
    method: 'post',
    data
  })
}

export function selectTEvent(params) {
  return request({
    url: '/api/tEvent/selectTEvent' + '?' + qs.stringify(params, { indices: false }),
    method: 'get'
    // data
  })
}
export function selectTObjectionList(params) {
  return request({
    url: 'api/tObjection/selectTObjectionList' + '?' + qs.stringify(params, { indices: false }),
    method: 'get'
    // data
  })
}
// export function tHandleLog(params) {
//   return request({
//     url: 'api/tHandleLog' + '?' + qs.stringify(params, { indices: false }),
//     method: 'get',
//     // data
//   })
// }

export function tHandleLog(data) {
  return request({
    url: 'api/tHandleLog',
    method: 'post',
    data
  })
}

export function selectSuperForm(params) {
  return request({
    url: 'api/tSupervisionForm/selectSuperForm' + '?' + qs.stringify(params, { indices: false }),
    method: 'get'
  })
}
export function secondarySupervision(data) {
  return request({
    url: 'api/tSupervisionForm/secondarySupervision',
    method: 'put',
    data
  })
}
// 批量指派审核
export function updateAll(data) {
  return request({
    url: 'api/tEvent/updateAll',
    method: 'post',
    data
  })
}

// 批量指派
export function updateAssignAll(data) {
  return request({
    url: 'api/tEvent/updateAssignAll',
    method: 'post',
    data
  })
}

// 催办
export function pressToDo(data) {
  return request({
    url: 'api/tEvent/pressToDo',
    method: 'post',
    data
  })
}

// 批量审核复核
export function aduitAll(data) {
  return request({
    url: 'api/tHandleLog/aduitAll',
    method: 'post',
    data
  })
}
export default { add, edit, del, importZip, tObjection, selectTEvent, selectTObjectionList, tHandleLog, selectSuperForm, secondarySupervision, updateAll, pressToDo, updateAssignAll, aduitAll }
